
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">

    <link rel="stylesheet" href="${pageContext.request.contextPath}/adminstrator/assets/css/view.css"/>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/adminstrator/assets/css/layui.css">
    <script src="${pageContext.request.contextPath}/adminstrator/assets/layui.all.js"></script>
    <title></title>
</head>
<body class="layui-view-body">
<div class="layui-content">
    <div class="layui-row">
        <div class="layui-card">
            <div class="layui-card-header">添加书籍</div>
            <form class="layui-form layui-card-body" action="${pageContext.request.contextPath}/addBook">
                <div class="layui-form-item">
                    <label class="layui-form-label" >文章名称</label>
                    <div class="layui-input-block">
                        <input type="text" name="title" required  lay-verify="required" placeholder="请输入文章标题" autocomplete="off" class="layui-input">
                    </div>
                </div>

<%--                <div class="layui-form-item">--%>
<%--                    <label class="layui-form-label">图书号ISBN</label>--%>
<%--                    <div class="layui-input-block">--%>
<%--                        <input type="text" name="isbn" required  lay-verify="required" placeholder="请输入书号" autocomplete="off" class="layui-input">--%>
<%--                    </div>--%>
<%--                </div>--%>

                <div class="layui-form-item">
                    <label class="layui-form-label">文章作者</label>
                    <div class="layui-input-inline">
                        <input type="text" name="author" required lay-verify="required" placeholder="请输入作者名" autocomplete="off" class="layui-input">
                    </div>

<%--                    <label class="layui-form-label">书籍价格</label>--%>
<%--                    <div class="layui-input-inline">--%>
<%--                        <input type="text" name="price" required lay-verify="required" placeholder="请输入书本价钱" autocomplete="off" class="layui-input">--%>
<%--                    </div>--%>
                </div>

                 <div class="layui-form-item">

                     <label class="layui-form-label">点赞量</label>
                     <div class="layui-input-inline">
                         <input type="text"  name="likes" class="layui-input" id="test4" placeholder="">
                     </div>

                     <label class="layui-form-label">发表日期</label>
                     <div class="layui-input-inline">
                         <input type="text" name="publishdate"  class="layui-input" id="test3" placeholder="选择发表时间">
                     </div>

<%--                    <div class="layui-form-mid layui-word-aux">辅助文字</div>--%>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">出版城市</label>
                    <div class="layui-input-block">
                        <select name="city" lay-verify="required">
                            <option value=""></option>
                            <option value="0">北京</option>
                            <option value="1">上海</option>
                            <option value="2">广州</option>
                            <option value="3">深圳</option>
                            <option value="4">杭州</option>
                        </select>
                    </div>
                </div>


                <div class="layui-form-item layui-form-text">
                    <label class="layui-form-label">文章内容</label>
                    <div class="layui-input-block">
                        <textarea name="content" placeholder="请输入文章内容" class="layui-textarea"></textarea>
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">书籍类型</label>
                    <div class="layui-input-block">
                        <input type="checkbox" name="like[write]" title="文学">
                        <input type="checkbox" name="like[read]" title="教育" checked>
                        <input type="checkbox" name="like[dai]" title="小说">
                        <input type="checkbox" name="like[dai]" title="辅学">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">允许借阅</label>
                    <div class="layui-input-inline">
                        <input type="checkbox" name="switch" lay-skin="switch">
                    </div>
                </div>

                <div class="layui-form-item">
                    <div class="layui-input-block">
                        <button type="submit" class="layui-btn layui-btn-blue" lay-submit lay-filter="formDemo">提交</button>
                        <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
<script>
    var form = layui.form
        ,layer = layui.layer
    layui.use('laydate', function(){
        var laydate = layui.laydate;
//年月选择器
        laydate.render({
            elem: '#test3'
            ,type: 'month'
        })
    })
</script>
</body>
</html>
